.#{$prefix}-c-video-preview-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;

  .modal-content {
    background: white;
    border-radius: 8px;
    max-width: 90vw;
    max-height: 90vh;
    width: 800px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  }

  .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;

    .modal-title {
      margin: 0;
      font-size: 18px;
      font-weight: bold;
      color: #333;
    }

    .close-btn {
      background: none;
      border: none;
      font-size: 24px;
      cursor: pointer;
      color: #999;
      padding: 0;
      width: 30px;
      height: 30px;
      display: flex;
      align-items: center;
    justify-content: center;

    &:hover {
        color: #333;
      }
    }
  }

  .modal-body {
    padding: 20px;
    flex: 1;
    max-height: calc(90vh - 70px);
    // overflow: auto;

    .video-container {
      margin-bottom: 20px;
      position: relative;
      max-height: calc(90vh - 110px);

      .preview-video {
        width: 100%;
        max-width: 100%;
        max-height: calc(90vh - 110px);
        height: auto;
        border-radius: 4px;
        background: #000;
        object-fit: contain;
      }

      .video-poster {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #000;
        border-radius: 4px;
        cursor: pointer;

        .poster-image {
          width: 100%;
          height: 100%;
          object-fit: cover;
          border-radius: 4px;
        }

        .play-overlay {
          position: absolute;
          top: 50%;
          left: 50%;
          transform: translate(-50%, -50%);
          background: rgba(0, 0, 0, 0.7);
          border-radius: 50%;
          width: 80px;
          height: 80px;
          display: flex;
          align-items: center;
          justify-content: center;
          transition: all 0.3s ease;

          &:hover {
            background: rgba(0, 0, 0, 0.9);
            transform: translate(-50%, -50%) scale(1.1);
          }

          .play-button {
            background: none;
            border: none;
            cursor: pointer;
            padding: 0;
            outline: none;

            .play-icon {
              color: white;
              font-size: 24px;
              margin-left: 4px;
            }
          }
        }
      }
    }

    .screenshot-container {
      margin-bottom: 20px;
      text-align: center;

      .screenshot-image {
        max-width: 100%;
        max-height: 400px;
        border-radius: 4px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
      }
    }

    .file-info {
      background: #f8f9fa;
      padding: 15px;
      border-radius: 4px;
      margin-bottom: 20px;

      .info-item {
        display: flex;
        justify-content: space-between;
        margin-bottom: 8px;

        &:last-child {
          margin-bottom: 0;
        }

        .label {
          font-weight: bold;
          color: #666;
        }

        .value {
          color: #333;
        }
      }
    }

    .loading {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      padding: 40px;
      color: #666;

      .spinner {
        width: 40px;
        height: 40px;
        border: 4px solid #f3f3f3;
        border-top: 4px solid #007bff;
        border-radius: 50%;
        animation: spin 1s linear infinite;
        margin-bottom: 15px;
      }

      @keyframes spin {
        0% { transform: rotate(0deg); }
        100% { transform: rotate(360deg); }
      }
    }

    .error {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      padding: 40px;
      color: #dc3545;

      .error-icon {
        font-size: 48px;
        margin-bottom: 15px;
      }

      p {
        margin: 0;
        text-align: center;
      }
    }
  }

  .modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 20px;
    border-top: 1px solid #eee;

    .btn {
      padding: 8px 16px;
      border: none;
      border-radius: 4px;
      cursor: pointer;
      font-size: 14px;
      transition: all 0.3s;

      &.btn-primary {
        background: #007bff;
        color: white;

        &:hover {
          background: #0056b3;
        }
      }

      &.btn-secondary {
        background: #6c757d;
        color: white;

        &:hover {
          background: #545b62;
        }
      }

      &.btn-info {
        background: #17a2b8;
        color: white;

        &:hover {
          background: #138496;
        }
      }
    }
  }
}

// 响应式设计
@media (max-width: 768px) {
  .video-preview-modal {
    .modal-content {
      width: 95vw;
      max-height: 95vh;
    }

    .modal-header {
      padding: 15px;

      .modal-title {
        font-size: 16px;
      }
    }

    .modal-body {
      padding: 15px;
    }

    .modal-footer {
      padding: 15px;
      flex-wrap: wrap;

      .btn {
        flex: 1;
        min-width: 80px;
      }
    }
  }
}


/* 隐藏下载、画中画、播放速率等按钮（可能因版本变化失效） */
video::-webkit-media-controls-download-button { display: none !important; }
video::-webkit-media-controls-pip-button { display: none !important; }
video::-webkit-media-controls-playback-rate-button { display: none !important; }
/* 有些情况下需要限制容器溢出 */
video::-webkit-media-controls-enclosure { overflow: hidden !important; }
